#include <bits/stdc++.h>
using namespace std;

#define ONLINE_JUDGE

#ifndef ONLINE_JUDGE
#define dbg(x...) { cerr << "\033[32;1m" << #x << " -> "; err(x); }
void err() { cerr << "\033[39;0m" << endl; }
template<typename T, typename... A>
void err(T a, A... x) { cerr << a << ' '; err(x...); }
#else
#define dbg(...)
#endif

typedef long long LL;


void assertRE()
{
	static int x;
	printf("%d\n", 1 / x);
}

const int N = 1e5+50;

int n;
const LL MOD = 2147483648;
LL a[N], b[N];
set<LL> S;
LL y[N];



int randint(int l, int r)
{
	static default_random_engine dre(time(0));
	uniform_int_distribution<int> u(l, r);
	return u(dre);
}

LL ex_gcd(LL a, LL b, LL &x, LL &y) {
    if (b == 0) { x = 1; y = 0; return a; }
    LL ret = ex_gcd(b, a % b, y, x);
    y -= a / b * x;
    return ret;
}


LL get_inv(LL a, LL M) {
    static LL x, y;
    // assert(ex_gcd(a, M, x, y) == 1);
    if (ex_gcd(a, M, x, y) != 1)
    	assertRE();
    return (x % M + M) % M;
}

void tryit(LL x)
{
	x %= MOD;
	if (x % 2 == 0)
		return;
	// dbg(x);
	int cnt = 0;
	LL cur = x;
	for (int i=1; i<=n; ++i, cur=(cur+x*2)%MOD)
	{
		if (S.count(cur))
			++cnt;
	}
	if (cnt == n/2)
	{
		printf("%lld\n", x);
		fflush(stdout);
		exit(0);
	}
}

int main(int argc, char const *argv[])
{
	scanf("%d", &n);
	for (int i=1; i<=n; ++i)
		printf("%lld%c", y[i] = i * 2 - 1, i==n? '\n': ' ');
	fflush(stdout);
	// S.insert(0);
	for (int i=1; i<=n/2; ++i)
	{
		scanf("%lld", &a[i]);
		S.insert(a[i]);
	}

	for (int i=1; i<=n; ++i)
	{
		LL x = a[1] * get_inv(y[i], MOD) % MOD;
		if (x % 2 == 0) continue;
		LL invx = get_inv(x, MOD);
		bool suc = true;
		unordered_set<int> S;
		for (int j=1; j<=n/2; ++j)
		{
			LL xj = invx * a[j] % MOD;
			if (xj % 2 == 0 || !(xj >=1 && xj <= 2*n-1) || S.count(xj))
			{
				suc = false;
				break;
			}
			S.insert(xj);
		}
		if (suc)
		{
			printf("%lld\n", x);
			exit(0);
		}
	}
	assert(false);
	return 0;
}